<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>投股中心</title>
    <link type="text/css" rel="stylesheet" href="css/style.css">
</head>
<body class="bg-pwd uf uf-ver">
<div class="reBack" onclick="window.history.go(-1);"></div>
<div id="content" class="uf-f">
    <div class="bigTitle">密码重置</div>
    <div class="inputGroup ub ub-ver">
        <div class="inputLi ub ub-ac">
            <div class="icon user"></div>
            <div class="UInput ub-f"><input type="text" placeholder="请输入手机号"></div>
        </div>
        <div class="inputLi ub ub-ac">
            <div class="icon safe"></div>
            <div class="UInput ub-f"><input type="text" placeholder="请输入验证码"></div>
            <div id="getCode"><span onclick="getCode();">获取验证码</span></div>
        </div>
        <div class="inputLi ub ub-ac">
            <div class="icon pwd"></div>
            <div class="UInput ub-f"><input type="password" placeholder="请输入密码"></div>
        </div>
        <div class="inputLi ub ub-ac">
            <div class="icon pwd"></div>
            <div class="UInput ub-f"><input type="password" placeholder="请再次输入密码"></div>
        </div>
    </div>
    <div class="bigBtn">重置</div>
</div>
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript">

    function getCode() {//获取验证码
        //...


        setTime();//倒数计时
    }

    function setTime() {//验证码倒计时
        var timeInit = 60;//验证码初始倒计时时限，单位秒
        var countdown = timeInit;//验证码初始倒计时计时器
        var e = $('#getCode');
        var eHtml = e.html();
        function down() {//验证码倒计时
            if (countdown == 0) {
                e.html(eHtml);
                countdown = timeInit;
                return;
            } else {
                e.html(countdown + '秒后重获');
                countdown--;
            }
            setTimeout(function () {
                down();
            }, 1000)
        }
        down();
    }


</script>

</body>
</html>